import requests,time
from bs4 import BeautifulSoup
headers = {
    'cookie' : '_ga=GA1.2.294784942.1524366479; _gid=GA1.2.1973850065.1524366479; gr_user_id=300789b2-c03e-4e8f-8f51-5b431dfaedf5; Hm_lvt_b44696b80ba45a90a23982e53f8347d0=1524366480,1524367413,1524389347; gr_session_id_e7b7e334c98d4530928513e7439f9ed2=122bb890-a29c-45f7-85cb-8c33de9b6400; _knewone_v2_session=YTV6eFgvOEhoSUd4REZhbXVwelJXYUJKYjZoRWRyQ2pOcWRCTTQyQkpKWndXY29zbDdoMWZpTkJLczR6ZExHY0daNlcyLzJBWm9YSXRNN09TMEZ2T0J6WlpmaXhFYnk1RDl5Y3QyTEoveW5rZlo0R2RYeExZSDgwcldoc2o1VmFaQzBwQXpMZURPRHVnOHJoR3hTQnEzR2gwcUtLYVJpcDBkZVREQmxaZHNLSzVyMEVZYTJ2RGR1aVVqVThKN29nLS0rbUpHYjcrU3lUS0x3bVRaSUVCemZnPT0%3D--3a3e705cd524276ab6dfa9853d274ea18bcef54d; Hm_lpvt_b44696b80ba45a90a23982e53f8347d0=1524389366',
    'user-agent' : 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36'
}
url = 'https://knewone.com/discover?page='
def get_page(url,data=None):

    web_url = requests.get(url,headers= headers)
    soup = BeautifulSoup(web_url.text,'lxml')
    imgs = soup.select('a.cover-inner > img')
    titles = soup.select('section.content > h4.title > a')
    link = soup.select('section.content > h4.title > a')

    if data == None:
        for imgs,titles,link in zip(imgs,titles,link):
            data = {
                'imgs' : imgs.get('src'),
                'titles' : titles.get('title'),
                'link' : link.get('href')
            }
            print(data)
def get_more_page(start,end):
    for one in range(start,end):
        get_page(url+str(one))
        time.sleep(2)

get_more_page(1,10)